<?php
/**
{
    "schoolId": "INT //机构id@search; ",
    "schoolName": "VARCHAR //机构名@search; ",
    "validDate": "DATETIME //到期时间@noList; @noLoad; ",
    "schoolTypeId": "INT //机构类别id@foreign::tbl_school_type; ",
    "typeId2": "INT //机构子类@foreign::tbl_school_type2; @noList; ",
    "schoolSortId": "INT //办学形式@foreign::tbl_school_sort; @noList; ",
    "provinceId": "INT //省份@noList; @foreign::tbl_province; ",
    "cityIdOk": "INT //市@foreign::tbl_city; @search; ",
    "districtId": "INT //区@foreign::tbl_district; @search; ",
    "province": "VARCHAR //省@province; @noList; @noView; ",
    "cityId": "VARCHAR //地区@json; @noView; ",
    "district": "VARCHAR //区@noList; ",
    "addr": "VARCHAR //详细地址@search; @noList; ",
    "tel": "VARCHAR //电话<br>分号隔开@noList; ",
    "contact": "VARCHAR //联系人@noList; ",
    "logo": "INT //机构logo@noList; ",
    "logoUrl": "VARCHAR //机构封面@image; @noList; ",
    "schoolScaleId": "VARCHAR //办学规模@foreign::tbl_school_scale; @noList; ",
    "schoolBrandId": "INT //品牌@foreign::tbl_school_brand; @search; @noList; ",
    "major": "VARCHAR //专业方向@noList; ",
    "area": "VARCHAR //机构面积@noList; ",
    "roomCount": "VARCHAR //教室数量@noList; ",
    "startTime": "VARCHAR //开始营业时间@noList; ",
    "endTime": "VARCHAR //结束营业时间@noList; ",
    "startWeekDay": "TINYINT //0-6<br>（0表示星期天）@noList; ",
    "endWeekDay": "TINYINT //0-6<br>（0表示星期天）@noList; ",
    "opTime": "VARCHAR //营业时间@noList; ",
    "lng": "DECIMAL //经度@noList; @noLoad; ",
    "lat": "DECIMAL //纬度@noList; @noLoad; ",
    "geo": "VARCHAR //geohash@noList; @delete; @noLoad; ",
    "location": "VARCHAR //定位信息@noList; @noView; ",
    "schoolScore": "FLOAT //机构得分@noLoad; @noList; @noView; ",
    "scoreCount": "INT //点评数@noLoad; @noList; @noView; ",
    "orderCount": "INT //订单数@noLoad; @noList; @noView; ",
    "finalScore": "FLOAT //综合评分@noLoad; @noList; @noView; ",
    "effectScore": "FLOAT //效果满意度@noLoad; @noList; @noView; ",
    "serviceScore": "FLOAT //老师评分@noLoad; @noList; @noView; ",
    "likeCount": "INT //点赞数量@noList; @noView; ",
    "summary": "TEXT //机构简介@noList; ",
    "teacherCount": "INT //教师数量@noList; ",
    "courseCount": "INT // 课程数量@noList; ",
    "cooperation": "TINYINT //是否愿意合作@noList; ",
    "uid": "INT //上报人@foreign::tbl_user; @noload; @search; @noList; ",
    "ip": "VARCHAR //ip@noload; @delete; @noList; ",
    "created": "DATETIME //上报时间@noList; ",
    "sort": "INT //排序@noList; ",
    "want": "INT //想学人数@noLoad; @noList; ",
    "learned": "INT //学过人数@noLoad; @noList; ",
    "status": "TINYINT //状态@status; 0::待审核; 2::下线::@admin; 3::审核通过; 4::审核不通过; 5::暂停营业::@admin; 88::删除::@admin; @noLoad; @reason; @search; ",
    "buyCount": "INT //购买人数@noLoad; @noList; ",
    "addFrom": "TINYINT //机构上报入口@status; 1::普通用户; 2::管理端; @search; @noLoad; "
}
 */

class School extends Base
{
    
	private $schoolId= '';//机构id@search;
	private $schoolName= NULL;//机构名@search;
	private $validDate= 'CURRENT_TIMESTAMP';//到期时间@noList;@noLoad;
	private $schoolTypeId= "0";//机构类别id@foreign::tbl_school_type;
	private $typeId2= "0";//机构子类@foreign::tbl_school_type2;@noList;
	private $schoolSortId= "1";//办学形式@foreign::tbl_school_sort;@noList;
	private $provinceId= "1";//省份@noList;@foreign::tbl_province;
	private $cityIdOk= "0";//市@foreign::tbl_city;@search;
	private $districtId= "0";//区@foreign::tbl_district;@search;
	private $province= NULL;//省@province;@noList;@noView;
	private $cityId= [];//地区@json;@noView;
	private $district= NULL;//区@noList;
	private $addr= NULL;//详细地址@search;@noList;
	private $tel= NULL;//电话<br>分号隔开@noList;
	private $contact= NULL;//联系人@noList;
	private $logo= NULL;//机构logo@noList;
	private $logoUrl= NULL;//机构封面@image;@noList;
	private $schoolScaleId= NULL;//办学规模@foreign::tbl_school_scale;@noList;
	private $schoolBrandId= "0";//品牌@foreign::tbl_school_brand;@search;@noList;
	private $major= NULL;//专业方向@noList;
	private $area= NULL;//机构面积@noList;
	private $roomCount= NULL;//教室数量@noList;
	private $startTime= NULL;//开始营业时间@noList;
	private $endTime= NULL;//结束营业时间@noList;
	private $startWeekDay= "0";//0-6<br>（0表示星期天）@noList;
	private $endWeekDay= "0";//0-6<br>（0表示星期天）@noList;
	private $opTime= NULL;//营业时间@noList;
	private $lng= "0.0000000";//经度@noList;@noLoad;
	private $lat= "0.0000000";//纬度@noList;@noLoad;
	private $geo= NULL;//geohash@noList;@delete;@noLoad;
	private $location= NULL;//定位信息@noList;@noView;
	private $schoolScore= "0";//机构得分@noLoad;@noList;@noView;
	private $scoreCount= "0";//点评数@noLoad;@noList;@noView;
	private $orderCount= "0";//订单数@noLoad;@noList;@noView;
	private $finalScore= "0";//综合评分@noLoad;@noList;@noView;
	private $effectScore= "0";//效果满意度@noLoad;@noList;@noView;
	private $serviceScore= "0";//老师评分@noLoad;@noList;@noView;
	private $likeCount= "0";//点赞数量@noList;@noView;
	private $summary= '';//机构简介@noList;
	private $teacherCount= "0";//教师数量@noList;
	private $courseCount= "0";// 课程数量@noList;
	private $cooperation= "0";//是否愿意合作@noList;
	private $uid= "0";//上报人@foreign::tbl_user;@noload;@search;@noList;
	private $ip= NULL;//ip@noload;@delete;@noList;
	private $created= 'CURRENT_TIMESTAMP';//上报时间@noList;
	private $sort= "0";//排序@noList;
	private $want= "0";//想学人数@noLoad;@noList;
	private $learned= "0";//学过人数@noLoad;@noList;
	private $status= "3";//状态@status;0::待审核;2::下线::@admin;3::审核通过;4::审核不通过;5::暂停营业::@admin;88::删除::@admin;@noLoad;@reason;@search;
	private $buyCount= "0";//购买人数@noLoad;@noList;
	private $addFrom= "1";//机构上报入口@status;1::普通用户;2::管理端;@search;@noLoad;

    public $isDbData = false;

    public function __construct()
    {
        parent::__construct();
    }


    public function __get($name) {
        return $this->$name;
    }

    public function __set($name, $value) {
        if(!$this->isDbData){
            if(!in_array($name,$this->loadedFiled))$this->loadedFiled[] = $name;
        }

        $this->$name=$value;
        $this->arr[$name] = $value;
    }

    public  function table()
    {
        return 'tbl_school';
    }
    
    public  function key(){
        return 'schoolId';
    }


    
    public static  function hideField()
    {
        return [];
    }
            
    public static  function skipField()
    {
        return [];
    }
            
    public static  function noViewField()
    {
        return array (  0 => 'province',  1 => 'cityId',  2 => 'location',  3 => 'schoolScore',  4 => 'scoreCount',  5 => 'orderCount',  6 => 'finalScore',  7 => 'effectScore',  8 => 'serviceScore',  9 => 'likeCount',);
    }
            
    public static  function jsonField()
    {
        return array (  0 => 'cityId',);
    }
            
    public static  function noLoadField()
    {
        return array (  0 => 'validDate',  1 => 'lng',  2 => 'lat',  3 => 'geo',  4 => 'schoolScore',  5 => 'scoreCount',  6 => 'orderCount',  7 => 'finalScore',  8 => 'effectScore',  9 => 'serviceScore',  10 => 'want',  11 => 'learned',  12 => 'status',  13 => 'buyCount',  14 => 'addFrom',);
    }
            
    public static  function deleteField()
    {
        return array (  0 => 'geo',  1 => 'ip',);
    }
            
    public function className()
    {
        return 'School';
    }
    
    public  function field()
    {
        return array (  'schoolId' =>   array (    0 => 'INT',    1 => 11,    2 => '机构id@search;',  ),  'schoolName' =>   array (    0 => 'VARCHAR',    1 => 200,    2 => '机构名@search;',  ),  'validDate' =>   array (    0 => 'DATETIME',    1 => 0,    2 => '到期时间@noList;@noLoad;',  ),  'schoolTypeId' =>   array (    0 => 'INT',    1 => 11,    2 => '机构类别id@foreign::tbl_school_type;',  ),  'typeId2' =>   array (    0 => 'INT',    1 => 11,    2 => '机构子类@foreign::tbl_school_type2;@noList;',  ),  'schoolSortId' =>   array (    0 => 'INT',    1 => 4,    2 => '办学形式@foreign::tbl_school_sort;@noList;',  ),  'provinceId' =>   array (    0 => 'INT',    1 => 11,    2 => '省份@noList;@foreign::tbl_province;',  ),  'cityIdOk' =>   array (    0 => 'INT',    1 => 11,    2 => '市@foreign::tbl_city;@search;',  ),  'districtId' =>   array (    0 => 'INT',    1 => 11,    2 => '区@foreign::tbl_district;@search;',  ),  'province' =>   array (    0 => 'VARCHAR',    1 => 50,    2 => '省@province;@noList;@noView;',  ),  'cityId' =>   array (    0 => 'VARCHAR',    1 => 512,    2 => '地区@json;@noView;',  ),  'district' =>   array (    0 => 'VARCHAR',    1 => 255,    2 => '区@noList;',  ),  'addr' =>   array (    0 => 'VARCHAR',    1 => 300,    2 => '详细地址@search;@noList;',  ),  'tel' =>   array (    0 => 'VARCHAR',    1 => 300,    2 => '电话<br>分号隔开@noList;',  ),  'contact' =>   array (    0 => 'VARCHAR',    1 => 30,    2 => '联系人@noList;',  ),  'logo' =>   array (    0 => 'INT',    1 => 11,    2 => '机构logo@noList;',  ),  'logoUrl' =>   array (    0 => 'VARCHAR',    1 => 512,    2 => '机构封面@image;@noList;',  ),  'schoolScaleId' =>   array (    0 => 'VARCHAR',    1 => 20,    2 => '办学规模@foreign::tbl_school_scale;@noList;',  ),  'schoolBrandId' =>   array (    0 => 'INT',    1 => 11,    2 => '品牌@foreign::tbl_school_brand;@search;@noList;',  ),  'major' =>   array (    0 => 'VARCHAR',    1 => 100,    2 => '专业方向@noList;',  ),  'area' =>   array (    0 => 'VARCHAR',    1 => 20,    2 => '机构面积@noList;',  ),  'roomCount' =>   array (    0 => 'VARCHAR',    1 => 100,    2 => '教室数量@noList;',  ),  'startTime' =>   array (    0 => 'VARCHAR',    1 => 255,    2 => '开始营业时间@noList;',  ),  'endTime' =>   array (    0 => 'VARCHAR',    1 => 255,    2 => '结束营业时间@noList;',  ),  'startWeekDay' =>   array (    0 => 'TINYINT',    1 => 4,    2 => '0-6<br>（0表示星期天）@noList;',  ),  'endWeekDay' =>   array (    0 => 'TINYINT',    1 => 4,    2 => '0-6<br>（0表示星期天）@noList;',  ),  'opTime' =>   array (    0 => 'VARCHAR',    1 => 255,    2 => '营业时间@noList;',  ),  'lng' =>   array (    0 => 'DECIMAL',    1 => 10,    2 => '经度@noList;@noLoad;',  ),  'lat' =>   array (    0 => 'DECIMAL',    1 => 10,    2 => '纬度@noList;@noLoad;',  ),  'geo' =>   array (    0 => 'VARCHAR',    1 => 30,    2 => 'geohash@noList;@delete;@noLoad;',  ),  'location' =>   array (    0 => 'VARCHAR',    1 => 255,    2 => '定位信息@noList;@noView;',  ),  'schoolScore' =>   array (    0 => 'FLOAT',    1 => 0,    2 => '机构得分@noLoad;@noList;@noView;',  ),  'scoreCount' =>   array (    0 => 'INT',    1 => 11,    2 => '点评数@noLoad;@noList;@noView;',  ),  'orderCount' =>   array (    0 => 'INT',    1 => 11,    2 => '订单数@noLoad;@noList;@noView;',  ),  'finalScore' =>   array (    0 => 'FLOAT',    1 => 0,    2 => '综合评分@noLoad;@noList;@noView;',  ),  'effectScore' =>   array (    0 => 'FLOAT',    1 => 0,    2 => '效果满意度@noLoad;@noList;@noView;',  ),  'serviceScore' =>   array (    0 => 'FLOAT',    1 => 0,    2 => '老师评分@noLoad;@noList;@noView;',  ),  'likeCount' =>   array (    0 => 'INT',    1 => 11,    2 => '点赞数量@noList;@noView;',  ),  'summary' =>   array (    0 => 'TEXT',    1 => 0,    2 => '机构简介@noList;',  ),  'teacherCount' =>   array (    0 => 'INT',    1 => 11,    2 => '教师数量@noList;',  ),  'courseCount' =>   array (    0 => 'INT',    1 => 11,    2 => ' 课程数量@noList;',  ),  'cooperation' =>   array (    0 => 'TINYINT',    1 => 4,    2 => '是否愿意合作@noList;',  ),  'uid' =>   array (    0 => 'INT',    1 => 11,    2 => '上报人@foreign::tbl_user;@noload;@search;@noList;',  ),  'ip' =>   array (    0 => 'VARCHAR',    1 => 15,    2 => 'ip@noload;@delete;@noList;',  ),  'created' =>   array (    0 => 'DATETIME',    1 => 0,    2 => '上报时间@noList;',  ),  'sort' =>   array (    0 => 'INT',    1 => 11,    2 => '排序@noList;',  ),  'want' =>   array (    0 => 'INT',    1 => 11,    2 => '想学人数@noLoad;@noList;',  ),  'learned' =>   array (    0 => 'INT',    1 => 11,    2 => '学过人数@noLoad;@noList;',  ),  'status' =>   array (    0 => 'TINYINT',    1 => 4,    2 => '状态@status;0::待审核;2::下线::@admin;3::审核通过;4::审核不通过;5::暂停营业::@admin;88::删除::@admin;@noLoad;@reason;@search;',  ),  'buyCount' =>   array (    0 => 'INT',    1 => 11,    2 => '购买人数@noLoad;@noList;',  ),  'addFrom' =>   array (    0 => 'TINYINT',    1 => 4,    2 => '机构上报入口@status;1::普通用户;2::管理端;@search;@noLoad;',  ),);
    }


}